Integrand size = 16, antiderivative size = 142 \[ \int f^{a+b x} \cos \left (d+f x^2\right ) \, dx=-\frac {1}{4} \sqrt [4]{-1} e^{\frac {1}{4} i \left (4 d+\frac {b^2 \log ^2(f)}{f}\right )} f^{-\frac {1}{2}+a} \sqrt {\pi } \text {erf}\left (\frac {\sqrt [4]{-1} (2 i f x+b \log (f))}{2 \sqrt {f}}\right )-\frac {1}{4} \sqrt [4]{-1} e^{-\frac {1}{4} i \left (4 d+\frac {b^2 \log ^2(f)}{f}\right )} f^{-\frac {1}{2}+a} \sqrt {\pi } \text {erfi}\left (\frac {\sqrt [4]{-1} (2 i f x-b \log (f))}{2 \sqrt {f}}\right ) \]
-1/4*(-1)^(1/4)*exp(1/4*I*(4*d+b^2*ln(f)^2/f))*f^(-1/2+a)*erf(1/2*(-1)^(1/ 4)*(2*I*f*x+b*ln(f))/f^(1/2))*Pi^(1/2)-1/4*(-1)^(1/4)*f^(-1/2+a)*erfi(1/2* (-1)^(1/4)*(2*I*f*x-b*ln(f))/f^(1/2))*Pi^(1/2)/exp(1/4*I*(4*d+b^2*ln(f)^2/ f))
Time = 0.19 (sec) , antiderivative size = 133, normalized size of antiderivative = 0.94 \[ \int f^{a+b x} \cos \left (d+f x^2\right ) \, dx=\frac {1}{4} \sqrt [4]{-1} e^{-\frac {i b^2 \log ^2(f)}{4 f}} f^{-\frac {1}{2}+a} \sqrt {\pi } \left (-\text {erfi}\left (\frac {(-1)^{3/4} (2 f x+i b \log (f))}{2 \sqrt {f}}\right ) (\cos (d)-i \sin (d))+e^{\frac {i b^2 \log ^2(f)}{2 f}} \text {erfi}\left (\frac {\sqrt [4]{-1} (2 f x-i b \log (f))}{2 \sqrt {f}}\right ) (-i \cos (d)+\sin (d))\right ) \]
((-1)^(1/4)*f^(-1/2 + a)*Sqrt[Pi]*(-(Erfi[((-1)^(3/4)*(2*f*x + I*b*Log[f]) )/(2*Sqrt[f])]*(Cos[d] - I*Sin[d])) + E^(((I/2)*b^2*Log[f]^2)/f)*Erfi[((-1 )^(1/4)*(2*f*x - I*b*Log[f]))/(2*Sqrt[f])]*((-I)*Cos[d] + Sin[d])))/(4*E^( ((I/4)*b^2*Log[f]^2)/f))
Time = 0.36 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {4976, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int f^{a+b x} \cos \left (d+f x^2\right ) \, dx\) |
\(\Big \downarrow \) 4976 |
\(\displaystyle \int \left (\frac {1}{2} e^{-i d-i f x^2} f^{a+b x}+\frac {1}{2} e^{i d+i f x^2} f^{a+b x}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {1}{4} \sqrt [4]{-1} \sqrt {\pi } f^{a-\frac {1}{2}} e^{\frac {1}{4} i \left (\frac {b^2 \log ^2(f)}{f}+4 d\right )} \text {erf}\left (\frac {\sqrt [4]{-1} (b \log (f)+2 i f x)}{2 \sqrt {f}}\right )-\frac {1}{4} \sqrt [4]{-1} \sqrt {\pi } f^{a-\frac {1}{2}} e^{-\frac {1}{4} i \left (\frac {b^2 \log ^2(f)}{f}+4 d\right )} \text {erfi}\left (\frac {\sqrt [4]{-1} (-b \log (f)+2 i f x)}{2 \sqrt {f}}\right )\) |
-1/4*((-1)^(1/4)*E^((I/4)*(4*d + (b^2*Log[f]^2)/f))*f^(-1/2 + a)*Sqrt[Pi]* Erf[((-1)^(1/4)*((2*I)*f*x + b*Log[f]))/(2*Sqrt[f])]) - ((-1)^(1/4)*f^(-1/ 2 + a)*Sqrt[Pi]*Erfi[((-1)^(1/4)*((2*I)*f*x - b*Log[f]))/(2*Sqrt[f])])/(4* E^((I/4)*(4*d + (b^2*Log[f]^2)/f)))
3.2.10.3.1 Defintions of rubi rules used
Int[Cos[v_]^(n_.)*(F_)^(u_), x_Symbol] :> Int[ExpandTrigToExp[F^u, Cos[v]^n , x], x] /; FreeQ[F, x] && (LinearQ[u, x] || PolyQ[u, x, 2]) && (LinearQ[v, x] || PolyQ[v, x, 2]) && IGtQ[n, 0]
Time = 0.46 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.80
method | result | size |
risch | \(-\frac {\sqrt {\pi }\, f^{a} {\mathrm e}^{-\frac {i \left (\ln \left (f \right )^{2} b^{2}+4 d f \right )}{4 f}} \operatorname {erf}\left (-\sqrt {i f}\, x +\frac {\ln \left (f \right ) b}{2 \sqrt {i f}}\right )}{4 \sqrt {i f}}-\frac {\sqrt {\pi }\, f^{a} {\mathrm e}^{\frac {i \left (\ln \left (f \right )^{2} b^{2}+4 d f \right )}{4 f}} \operatorname {erf}\left (-\sqrt {-i f}\, x +\frac {\ln \left (f \right ) b}{2 \sqrt {-i f}}\right )}{4 \sqrt {-i f}}\) | \(114\) |
-1/4*Pi^(1/2)*f^a*exp(-1/4*I*(ln(f)^2*b^2+4*d*f)/f)/(I*f)^(1/2)*erf(-(I*f) ^(1/2)*x+1/2*ln(f)*b/(I*f)^(1/2))-1/4*Pi^(1/2)*f^a*exp(1/4*I*(ln(f)^2*b^2+ 4*d*f)/f)/(-I*f)^(1/2)*erf(-(-I*f)^(1/2)*x+1/2*ln(f)*b/(-I*f)^(1/2))
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 265 vs. \(2 (98) = 196\).
Time = 0.26 (sec) , antiderivative size = 265, normalized size of antiderivative = 1.87 \[ \int f^{a+b x} \cos \left (d+f x^2\right ) \, dx=\frac {\sqrt {2} \pi \sqrt {\frac {f}{\pi }} e^{\left (\frac {-i \, b^{2} \log \left (f\right )^{2} + 4 \, a f \log \left (f\right ) - 4 i \, d f}{4 \, f}\right )} \operatorname {C}\left (\frac {\sqrt {2} {\left (2 \, f x + i \, b \log \left (f\right )\right )} \sqrt {\frac {f}{\pi }}}{2 \, f}\right ) - \sqrt {2} \pi \sqrt {\frac {f}{\pi }} e^{\left (\frac {i \, b^{2} \log \left (f\right )^{2} + 4 \, a f \log \left (f\right ) + 4 i \, d f}{4 \, f}\right )} \operatorname {C}\left (-\frac {\sqrt {2} {\left (2 \, f x - i \, b \log \left (f\right )\right )} \sqrt {\frac {f}{\pi }}}{2 \, f}\right ) - i \, \sqrt {2} \pi \sqrt {\frac {f}{\pi }} e^{\left (\frac {-i \, b^{2} \log \left (f\right )^{2} + 4 \, a f \log \left (f\right ) - 4 i \, d f}{4 \, f}\right )} \operatorname {S}\left (\frac {\sqrt {2} {\left (2 \, f x + i \, b \log \left (f\right )\right )} \sqrt {\frac {f}{\pi }}}{2 \, f}\right ) - i \, \sqrt {2} \pi \sqrt {\frac {f}{\pi }} e^{\left (\frac {i \, b^{2} \log \left (f\right )^{2} + 4 \, a f \log \left (f\right ) + 4 i \, d f}{4 \, f}\right )} \operatorname {S}\left (-\frac {\sqrt {2} {\left (2 \, f x - i \, b \log \left (f\right )\right )} \sqrt {\frac {f}{\pi }}}{2 \, f}\right )}{4 \, f} \]
1/4*(sqrt(2)*pi*sqrt(f/pi)*e^(1/4*(-I*b^2*log(f)^2 + 4*a*f*log(f) - 4*I*d* f)/f)*fresnel_cos(1/2*sqrt(2)*(2*f*x + I*b*log(f))*sqrt(f/pi)/f) - sqrt(2) *pi*sqrt(f/pi)*e^(1/4*(I*b^2*log(f)^2 + 4*a*f*log(f) + 4*I*d*f)/f)*fresnel _cos(-1/2*sqrt(2)*(2*f*x - I*b*log(f))*sqrt(f/pi)/f) - I*sqrt(2)*pi*sqrt(f /pi)*e^(1/4*(-I*b^2*log(f)^2 + 4*a*f*log(f) - 4*I*d*f)/f)*fresnel_sin(1/2* sqrt(2)*(2*f*x + I*b*log(f))*sqrt(f/pi)/f) - I*sqrt(2)*pi*sqrt(f/pi)*e^(1/ 4*(I*b^2*log(f)^2 + 4*a*f*log(f) + 4*I*d*f)/f)*fresnel_sin(-1/2*sqrt(2)*(2 *f*x - I*b*log(f))*sqrt(f/pi)/f))/f
\[ \int f^{a+b x} \cos \left (d+f x^2\right ) \, dx=\int f^{a + b x} \cos {\left (d + f x^{2} \right )}\, dx \]
Time = 0.22 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.04 \[ \int f^{a+b x} \cos \left (d+f x^2\right ) \, dx=-\frac {\sqrt {2} \sqrt {\pi } {\left ({\left (\left (i - 1\right ) \, f^{a} \cos \left (\frac {b^{2} \log \left (f\right )^{2} + 4 \, d f}{4 \, f}\right ) + \left (i + 1\right ) \, f^{a} \sin \left (\frac {b^{2} \log \left (f\right )^{2} + 4 \, d f}{4 \, f}\right )\right )} \operatorname {erf}\left (\frac {2 i \, f x - b \log \left (f\right )}{2 \, \sqrt {i \, f}}\right ) + {\left (\left (i + 1\right ) \, f^{a} \cos \left (\frac {b^{2} \log \left (f\right )^{2} + 4 \, d f}{4 \, f}\right ) + \left (i - 1\right ) \, f^{a} \sin \left (\frac {b^{2} \log \left (f\right )^{2} + 4 \, d f}{4 \, f}\right )\right )} \operatorname {erf}\left (\frac {2 i \, f x + b \log \left (f\right )}{2 \, \sqrt {-i \, f}}\right )\right )}}{8 \, \sqrt {f}} \]
-1/8*sqrt(2)*sqrt(pi)*(((I - 1)*f^a*cos(1/4*(b^2*log(f)^2 + 4*d*f)/f) + (I + 1)*f^a*sin(1/4*(b^2*log(f)^2 + 4*d*f)/f))*erf(1/2*(2*I*f*x - b*log(f))/ sqrt(I*f)) + ((I + 1)*f^a*cos(1/4*(b^2*log(f)^2 + 4*d*f)/f) + (I - 1)*f^a* sin(1/4*(b^2*log(f)^2 + 4*d*f)/f))*erf(1/2*(2*I*f*x + b*log(f))/sqrt(-I*f) ))/sqrt(f)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 300 vs. \(2 (98) = 196\).
Time = 0.32 (sec) , antiderivative size = 300, normalized size of antiderivative = 2.11 \[ \int f^{a+b x} \cos \left (d+f x^2\right ) \, dx=\frac {i \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (-\frac {1}{8} i \, \sqrt {2} {\left (4 \, x - \frac {\pi b \mathrm {sgn}\left (f\right ) - \pi b + 2 i \, b \log \left ({\left | f \right |}\right )}{f}\right )} {\left (\frac {i \, f}{{\left | f \right |}} + 1\right )} \sqrt {{\left | f \right |}}\right ) e^{\left (\frac {i \, \pi ^{2} b^{2} \mathrm {sgn}\left (f\right )}{8 \, f} + \frac {\pi b^{2} \log \left ({\left | f \right |}\right ) \mathrm {sgn}\left (f\right )}{4 \, f} - \frac {i \, \pi ^{2} b^{2}}{8 \, f} - \frac {\pi b^{2} \log \left ({\left | f \right |}\right )}{4 \, f} + \frac {i \, b^{2} \log \left ({\left | f \right |}\right )^{2}}{4 \, f} - \frac {1}{2} i \, \pi a \mathrm {sgn}\left (f\right ) + \frac {1}{2} i \, \pi a + a \log \left ({\left | f \right |}\right ) + i \, d\right )}}{4 \, {\left (\frac {i \, f}{{\left | f \right |}} + 1\right )} \sqrt {{\left | f \right |}}} - \frac {i \, \sqrt {2} \sqrt {\pi } \operatorname {erf}\left (\frac {1}{8} i \, \sqrt {2} {\left (4 \, x + \frac {\pi b \mathrm {sgn}\left (f\right ) - \pi b + 2 i \, b \log \left ({\left | f \right |}\right )}{f}\right )} {\left (-\frac {i \, f}{{\left | f \right |}} + 1\right )} \sqrt {{\left | f \right |}}\right ) e^{\left (-\frac {i \, \pi ^{2} b^{2} \mathrm {sgn}\left (f\right )}{8 \, f} - \frac {\pi b^{2} \log \left ({\left | f \right |}\right ) \mathrm {sgn}\left (f\right )}{4 \, f} + \frac {i \, \pi ^{2} b^{2}}{8 \, f} + \frac {\pi b^{2} \log \left ({\left | f \right |}\right )}{4 \, f} - \frac {i \, b^{2} \log \left ({\left | f \right |}\right )^{2}}{4 \, f} - \frac {1}{2} i \, \pi a \mathrm {sgn}\left (f\right ) + \frac {1}{2} i \, \pi a + a \log \left ({\left | f \right |}\right ) - i \, d\right )}}{4 \, {\left (-\frac {i \, f}{{\left | f \right |}} + 1\right )} \sqrt {{\left | f \right |}}} \]
1/4*I*sqrt(2)*sqrt(pi)*erf(-1/8*I*sqrt(2)*(4*x - (pi*b*sgn(f) - pi*b + 2*I *b*log(abs(f)))/f)*(I*f/abs(f) + 1)*sqrt(abs(f)))*e^(1/8*I*pi^2*b^2*sgn(f) /f + 1/4*pi*b^2*log(abs(f))*sgn(f)/f - 1/8*I*pi^2*b^2/f - 1/4*pi*b^2*log(a bs(f))/f + 1/4*I*b^2*log(abs(f))^2/f - 1/2*I*pi*a*sgn(f) + 1/2*I*pi*a + a* log(abs(f)) + I*d)/((I*f/abs(f) + 1)*sqrt(abs(f))) - 1/4*I*sqrt(2)*sqrt(pi )*erf(1/8*I*sqrt(2)*(4*x + (pi*b*sgn(f) - pi*b + 2*I*b*log(abs(f)))/f)*(-I *f/abs(f) + 1)*sqrt(abs(f)))*e^(-1/8*I*pi^2*b^2*sgn(f)/f - 1/4*pi*b^2*log( abs(f))*sgn(f)/f + 1/8*I*pi^2*b^2/f + 1/4*pi*b^2*log(abs(f))/f - 1/4*I*b^2 *log(abs(f))^2/f - 1/2*I*pi*a*sgn(f) + 1/2*I*pi*a + a*log(abs(f)) - I*d)/( (-I*f/abs(f) + 1)*sqrt(abs(f)))
Timed out. \[ \int f^{a+b x} \cos \left (d+f x^2\right ) \, dx=\int f^{a+b\,x}\,\cos \left (f\,x^2+d\right ) \,d x \]